﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class App_Master_MasterPage : System.Web.UI.MasterPage
{
    protected Model.CMember loginUserInfo = null;
    protected Model.UsersAccount user_account = null;
    protected Model.CMember CMember = null;
    protected bool islogin = false;
    protected void Page_Load(object sender, EventArgs e)
    {
        loginUserInfo = BLL.CMember.UserLoginInfo();
        //当前用户没有登录
        if (loginUserInfo != null)
        {
            islogin = true;
            user_account = BLL.UsersAccount.GetModelByuser_id(loginUserInfo.Id);
            CMember = BLL.CMember.GetModel(loginUserInfo.Id);
            if (user_account == null)
            {
                BLL.Session.Remove(BLL.CMember.LoginUserSessionKey);
                Response.Redirect("/Default.aspx");
            }
        }
    }
}
